home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_usrdoc / SVGALIB-.{2E / LRMI-0.5M / LRMI.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  1KB  |  73 lines

  1. /*
  2. Linux Real Mode Interface - A library of DPMI-like functions for Linux.
  3.  
  4. Copyright (C) 1998 by Josh Vanderhoof
  5.  
  6. You are free to distribute and modify this file, as long as you
  7. do not remove this copyright notice and clearly label modified
  8. versions as being modified.
  9.  
  10. This software has NO WARRANTY.  Use it at your own risk.
  11.  
  12. */
  13.  
  14. #ifndef LRMI_H
  15. #define LRMI_H
  16.  
  17. struct LRMI_regs
  18.     {
  19.     unsigned int edi;
  20.     unsigned int esi;
  21.     unsigned int ebp;
  22.     unsigned int reserved;
  23.     unsigned int ebx;
  24.     unsigned int edx;
  25.     unsigned int ecx;
  26.     unsigned int eax;
  27.     unsigned short int flags;
  28.     unsigned short int es;
  29.     unsigned short int ds;
  30.     unsigned short int fs;
  31.     unsigned short int gs;
  32.     unsigned short int ip;
  33.     unsigned short int cs;
  34.     unsigned short int sp;
  35.     unsigned short int ss;
  36.     };
  37.  
  38. /*
  39.  Initialize
  40.  returns 1 if sucessful, 0 for failure
  41. */
  42. int
  43. LRMI_init(void);
  44.  
  45. /*
  46.  Simulate a 16 bit far call
  47.  returns 1 if sucessful, 0 for failure
  48. */
  49. int
  50. LRMI_call(struct LRMI_regs *r);
  51.  
  52. /*
  53.  Simulate a 16 bit interrupt
  54.  returns 1 if sucessful, 0 for failure
  55. */
  56. int
  57. LRMI_int(int interrupt, struct LRMI_regs *r);
  58.  
  59. /*
  60.  Allocate real mode memory
  61.  The returned block is paragraph (16 byte) aligned
  62. */
  63. void *
  64. LRMI_alloc_real(int size);
  65.  
  66. /*
  67.  Free real mode memory
  68. */
  69. void
  70. LRMI_free_real(void *m);
  71.  
  72. #endif
  73.